package com.healthcloud.controller.modules.PatientRecord;

import java.util.List;

import com.healthcloud.entity.MsgVo;
import com.healthcloud.entity.PatientRecord.MedicalProjectEntity;
import com.healthcloud.service.PatientRecord.MedicalProjectService;
import com.healthcloud.utils.PageParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * 检验项目
 * 
 */
@Controller
@RequestMapping("medicalProject")
public class MedicalProjectController {
	@Autowired
	private MedicalProjectService medicalProjectService;

    @ApiOperation(value = "项目列表", notes = "项目列表")
	@RequestMapping(value = "/searchMedicalProject", method = RequestMethod.POST)
	@ResponseBody
    public MsgVo  searchMedicalProject(MedicalProjectEntity entity, @ModelAttribute("pageParam")PageParam pageParam){
        List<MedicalProjectEntity> list = medicalProjectService.queryList(entity, pageParam);
        int count = medicalProjectService.queryTotal(entity);
        return new MsgVo(list,count,count,pageParam.getsEcho());
    }

}
